1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module sourceview.CompletionSnippets; 26 27 private import glib.ConstructionException; 28 private import gobject.ObjectG; 29 private import sourceview.CompletionProviderIF; 30 private import sourceview.CompletionProviderT; 31 private import sourceview.c.functions; 32 public import sourceview.c.types; 33 34 35 /** 36 * A [iface@CompletionProvider] for the completion of snippets. 37 * 38 * The `GtkSourceCompletionSnippets` is an example of an implementation of 39 * the [iface@CompletionProvider] interface. The proposals are snippets 40 * registered with the [class@SnippetManager]. 41 */ 42 public class CompletionSnippets : ObjectG, CompletionProviderIF 43 { 44 /** the main Gtk struct */ 45 protected GtkSourceCompletionSnippets* gtkSourceCompletionSnippets; 46 47 /** Get the main Gtk struct */ 48 public GtkSourceCompletionSnippets* getCompletionSnippetsStruct(bool transferOwnership = false) 49 { 50 if (transferOwnership) 51 ownedRef = false; 52 return gtkSourceCompletionSnippets; 53 } 54 55 /** the main Gtk struct as a void* */ 56 protected override void* getStruct() 57 { 58 return cast(void*)gtkSourceCompletionSnippets; 59 } 60 61 /** 62 * Sets our main struct and passes it to the parent class. 63 */ 64 public this (GtkSourceCompletionSnippets* gtkSourceCompletionSnippets, bool ownedRef = false) 65 { 66 this.gtkSourceCompletionSnippets = gtkSourceCompletionSnippets; 67 super(cast(GObject*)gtkSourceCompletionSnippets, ownedRef); 68 } 69 70 // add the CompletionProvider capabilities 71 mixin CompletionProviderT!(GtkSourceCompletionSnippets); 72 73 74 /** */ 75 public static GType getType() 76 { 77 return gtk_source_completion_snippets_get_type(); 78 } 79 80 /** */ 81 public this() 82 { 83 auto __p = gtk_source_completion_snippets_new(); 84 85 if(__p is null) 86 { 87 throw new ConstructionException("null returned by new"); 88 } 89 90 this(cast(GtkSourceCompletionSnippets*) __p, true); 91 } 92 }